import { useStore } from '@/store'

const store = useStore()

//验证是否具有对应的按钮权限
export function usePermission(pageName: string, hanldeName: string) {
  const permissions = store.state.login.permissions
  const verifyPermission = `system:${pageName}:${hanldeName}`

  return !!permissions.find((item: string) => item === verifyPermission)
}
